interface A{
    void testA();
}
public class demo3 {
    public static void main(String[] args) {
        new A(){
            @Override
            public void testA() {
                System.out.println("123");
            }
        }.testA();

        A a = new A() {
            @Override
            public void testA() {
                System.out.println("123");
            }
        };
        a.testA();
    }
}
